import SvgIcon from './SvgIcon/index.vue'
import { App} from 'vue'
//引入element-plus提供全部图标组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//全局对象
const allGloablComponent = { SvgIcon }

export default {
    install(app: App) {
        // 添加全局组件
        Object.keys(allGloablComponent).forEach(key => {
            app.component(key, allGloablComponent[key])
        })
        // 添加element-plus 组件
        for(const [key, component] of Object.entries(ElementPlusIconsVue)) {
            app.component(key, component)
        }
    }
}